package com.xxxx.paipaicars.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xxxx.paipaicars.service.IBaseService;

/**
 * @author 北海不是海
 * @version 1.0
 * Create by 2023-06-12 22:21
 * 自己行封装一个分页的
 */

class PageServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements IBaseService<T> {

    private static  Page page = null;

    protected Page SetAndGetPage(final Integer pageNum , final Integer pageSize){

        page = new Page();
        page.setSize(pageSize==null?0:pageSize);
        page.setPages(pageNum==null?0:pageNum);

        return page;
    }
}
